package com.wzh.design.strategy.demo2;

/**
 * @description: 策略模式
 * @author: WZH
 * @time: 2021/5/26 8:54
 */
/**
 * 红头鸭：继承基类Duck
 */
public class RedHeadDuck extends Duck {

    public RedHeadDuck(){
        quackBeahavior=new BadQuack();
    }

    @Override
    public void display() {
        System.out.println("我是独一无二的，我是红头鸭。");
    }
}
